package com.uroad.jilinpda.activity;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.uroad.jilinpda.R;
import com.uroad.jilinpda.common.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;

public class ETCActivationSuccessActivity extends BaseActivity {
    @BindView(R.id.tvPlateNo)
    TextView tvPlateNo;
    @BindView(R.id.tvCardNo)
    TextView tvCardNo;
    @BindView(R.id.btn_complete)
    Button btn_complete;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setBaseContentLayout(R.layout.activity_etcactivation_successful);
        setTitle("安装激活");
        ButterKnife.bind(this);
        initView();
        initClick();
    }

    private void initView() {
       /* tv_zhuyi.setText(Html.fromHtml("<font color ='#333333' size='13'>"+"注意⚠您的标签已激活成功，"+
                "</font><font color= '#FF2418' size='13'>"+"不能将它摘下重新安装或移动了"+"</font>"+
                "<font color ='#333333' size='13'>"+"，否则标签失效，您将无法通行ETC车道！"+"</font>"));*/
        Bundle bundle = getIntent().getExtras();
        if (bundle != null) {
            String plateNo = bundle.getString("plateNo");
            String cardNo = bundle.getString("cardNo");
            if (!TextUtils.isEmpty(plateNo)) {
                tvPlateNo.setText(plateNo);
            }
            if (!TextUtils.isEmpty(cardNo)) {
                tvCardNo.setText(cardNo);
            }
        }
    }

    private void initClick() {
        btn_complete.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                openActivity(MainActivity.class);
                finish();
            }
        });
    }
}
